﻿using Game;
namespace Mekiasm
{
    public class ComponentCropCron : ComponentEnergyMachine
    {
        public ComponentCropCron()
        {
            AllowChangeElectricMode = false;
            AllowChangeFluidMode = false;
            AllowChangeGasMode = false;
            AllowChangeItemMode = false;
        }

        public override bool CanAcceptFuel(int slotIndex, int fuelValue)
        {
            if (Terrain.ExtractContents(fuelValue) == WaterBlock.Index) return true;
            return false;
        }

        public override int GetSlotCapacity(int slotIndex, int value)
        {
            if (slotIndex == 17)
            {
                if (Terrain.ExtractContents(value) != SaltpeterChunkBlock.Index) return 0;
            }
            return base.GetSlotCapacity(slotIndex, value);
        }
    }
}
